package com.bears.god.sup.service;

import java.util.List;

import com.bears.god.sup.dao.DAOFactory;
import com.bears.god.sup.model.Bill;

public class BillServiceImp implements IBillService{

	@Override
	public void save(Bill bill) throws Exception {
		DAOFactory.getBillDAO().save(bill);
		
	}
	
	@Override
	public void updateprice(Bill bill) throws Exception {
		DAOFactory.getBillDAO().updateprice(bill);;
	}

	
	@Override
	public List<Bill> findAll() throws Exception {
		return DAOFactory.getBillDAO().findAll();
	}

	@Override
	public void detele(int id) throws Exception {
		DAOFactory.getBillDAO().detele(id);;
		
	}
	
	
	@Override
	public void update(Bill bill) throws Exception{
		DAOFactory.getBillDAO().update(bill);
	}
	
	@Override
	public List<Bill> findByName(String name) throws Exception{
		return DAOFactory.getBillDAO().findByName(name);
	}
	
	@Override
	public Bill findById(int id) throws Exception{
		return DAOFactory.getBillDAO().findById(id);
	}
}
